/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package za.ac.cput.kleintjes.studentclass;

/**
 *
 * @author Administrator
 */
public class Student {
    private String name;
    private String surname;
    private int[] mark = new int[4];
    private int total;

    public Student(String name, String surname) {
        this.name = name;
        this.surname = surname;
    }

    public Student() {
    }
    
    public int[] getMark() {
        return mark;
    }
    
    public int getMark(int num)
    {
        return mark[num];
    }
    
    public void setMark(int[] mark) {
        this.mark = mark;
    }
    
    public void setMark(int post, int mark) {
        this.mark[post] = mark;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSurname() {
        return surname;
    }

    public void setSurname(String surname) {
        this.surname = surname;
    }

    public int getTotal() {
        return ( mark[0]+mark[1]+mark[2]+mark[3] );
    }
}
